package com.goktech.olala.server.dao.customer;

import com.goktech.olala.server.pojo.customer.CtmPointLog;

import java.util.List;

/**
 * @author wyn
 */
public interface CtmPointLogMapper {
    /**
     * 根据积分记录主键ID删除
     * @param pointId
     * @return
     * @throws Exception
     */
    int deleteByPrimaryKey(Long pointId) throws Exception;

    /**
     * 新增积分记录
     * @param record
     * @return
     * @throws Exception
     */
    int insertPoint(CtmPointLog record) throws Exception;

    /**
     * 根据积分记录主键ID查询
     * @param pointId
     * @return
     * @throws Exception
     */
    CtmPointLog selectByPrimaryKey(Long pointId)  throws Exception;

    /**
     * 查询所有
     * @return
     * @throws Exception
     */
    List<CtmPointLog> selectAll() throws Exception;

    /**
     * 更新积分记录
     * @param record
     * @return
     * @throws Exception
     */
    int updateByPrimaryKey(CtmPointLog record) throws Exception;

    /**
     * 查询会员积分信息
     * @param customerId
     * @return
     * @throws Exception
     */
    List<CtmPointLog> queryCustomerPoints(String customerId) throws Exception;

    /**
     * 查询会员可用积分
     * @param customerId
     * @return
     * @throws Exception
     */
    String queryCustomerUsablePoints(String customerId) throws Exception;


}